# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=enumiax
pkgver=1.0
pkgrel=6
groups=('blackarch' 'blackarch-scanner')
pkgdesc='An IAX enumerator.'
url='http://sourceforge.net/projects/enumiax/'
license=('GPL')
depends=('glibc')
arch=('x86_64' 'aarch64')
source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz")
sha512sums=('48c244fe7bd422eecc1479b98b26c09f52674025bf3b94997dc3a0d37d50b0e861c79a7d7699901d95b4681286cdfc76180412b5f7fb298bd9fb9b14c76fe696')

build() {
  cd "$pkgname-$pkgver"

  make
}

prepare() {
  cd "$pkgname-$pkgver"

  sed -i "s|ienumiaxtall|/bin/install|g" Makefile
  sed -i "s|\${DEBUG}|$CFLAGS|g" base.mk
}

package() {
  cd "$pkgname-$pkgver"

  install -dm 755 "$pkgdir/usr/bin"

  make BINDIR="$pkgdir/usr/bin" install
}

